{block name="style"}
<style>
    .layui-table td .layui-table-cell {
        height: auto !important;
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
        word-break: break-all;
    }
    .layui-table td .layui-table-grrid-down{
        display: none;
    }
</style>
{/block}
<div class="layui-tab layui-tab-card">
    <div class="layui-tab-content" style="background-color: #F0F2F5;">

        <div class="layui-card">
            <div class="layui-card-header">
                基本信息 (订单号：{$vo.order_no|default=''})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;创建时间：{$vo.create_at}
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">订单号:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.order_no|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">状态:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.status_name|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">商城平台:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.platform_name|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">仓库:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.warehouse_c_name|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">用户平台:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.shop_account_name|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">发货渠道:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.channel_name|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">购买人:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.buy_user|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">购买人电话:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.buy_mobile|default=''}</label>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">
                备注
                <!--                    <div class="remark-add" style="float:right"><a href="javascript:;" data-modal="{:sysuri('addRemark')}?order_id={$vo.id}" data-title="{:lang('添加平台')}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('添加备注')}</a></div>-->
            </div>
            <div class="layui-card-body remark">
                <table class="layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="150">
                        <col width="150">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>操作时间</th>
                        <th>操作人</th>
                        <th>备注类型</th>
                        <th>备注内容</th>
                    </tr>
                    </thead>
                    <tbody class="remark-list">

                    </tbody>
                </table>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">
                收货地址
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">国家:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.country|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">省/州:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.user_region|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">城市:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.user_city|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">区/县:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.user_district|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">详细地址:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.user_address|default=''}</label>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-form-item layui-inline">
                            <label class="layui-form-label">邮编:</label>
                            <label class="layui-form-label" style="text-align:left;padding-left: 0px;width: auto;">{$vo.zip_code|default=''}</label>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card" style="margin-top: 10px;">
            <div class="layui-card-header">包裹详情</div>
            <div class="layui-card-body">

                <table id="OrderInfoList" data-url="{:sysuri('infoList')}"></table>
            </div>
        </div>
    </div>
</div>
{block name="script"}
<script>
    $('#OrderInfoList').layTable({
        // even: true,
        url: '{:url("InfoList")}',
        // height: '500px',
        where: {order_no: '{$vo.other_order_no|default="0"}'},
        page: false,
        cols: [[
            // {field: 'LAY_NUM', title: '{:lang("序号")}', width: 100, align: 'center', },
            {field: 'order_no', title: '{:lang("第三方订单号")}', align: 'center', minWidth: 80 },
            {field: 'express_no', title: '{:lang("物流单号")}', align: 'center', minWidth: 80 },
            {field: 'express_company', title: '{:lang("物流公司")}', align: 'center', minWidth: 80 },
            {field: 'location_code', title: '{:lang("货位")}', align: 'center', minWidth: 80 },
            {field: 'status_name', title: '{:lang("状态")}', align: 'center', minWidth: 80 },
            {field: 'confirm_time', title: '{:lang("推送时间")}', align: 'center', minWidth: 80 },
            {field: 'into_time', title: '{:lang("入库时间")}', align: 'center', minWidth: 80 },
            {toolbar: '#infoToolbar', align: 'center', width: 150, title: '{:lang("操作")}', fixed: 'right'},
        ]]
        ,done: function(res, curr, count){

        }
    });

    function tabClick (express_id) {
        layui.table.reload('OrderInfoList', {
            where:{express_id:express_id},
        });
    }


</script>
<script type="text/html" id="infoToolbar">
    <!--{if auth('info')}-->
    <a class="layui-btn layui-btn-xs layui-btn-primary" data-title="{:lang('查看商品')}" data-offset="['60px','200px']" data-area="['{{maxWidth-210}}px', '{{maxHeight-60}}px']"  data-modal='{:url("GoodsList")}?order_express_id={{d.id}}'>{:lang('查看商品')}</a>
    <!--{/if}-->

</script>
<!--图片-->
<script type="text/html" id="imgTpl" >
    <img src="{{ d.image }}" class="preview-all" style="max-width: 80px;max-height: 80px;" data-tips-image data-tips-hover >
</script>
<!--商品-->
<script type="text/html" id="goodsTpl" >
    <div>
        <span>{{ d.goods_name }}</span><br>
        <span>平台SKU:{{ d.goods_nu }}</span><br>
        <span>产品规格:{{ d.attr_title }}</span><br>
        <span>本地SPU:<a href="{{ d.goods_url }}" target="_blank">{{ d.goods_spu }}</a></span>
    </div>
</script>
<!--交易-->
<script type="text/html" id="tradeTpl" >
    <div>
        <span>单价:{{ d.price_str }}</span><br>
        <span>数量:{{ d.num }}</span><br>
        <span>总价:{{ d.all_price_str }}</span>
    </div>
</script>
{/block}